#!/bin/env python
from kafka import KafkaConsumer

# connect to Kafka server and pass the topic we want to consume
consumer = KafkaConsumer('test_20181105', group_id='test_group2',
                         bootstrap_servers='100.69.222.221:9092,100.69.222.222:9092,100.69.222.223:9092')
try:
    for msg in consumer:
        print(msg)
        # print("%s:%d:%d: key=%s value=%s" % (msg.topic, msg.partition, msg.offset, msg.key, msg.value))
except KeyboardInterrupt as e:
    print(e)
